#include "sys.h"
#include "delay.h"
#include "usart.h"

//主要头文件
#include "mmwavelink.h"
#include "mmw_singlechip_nonos_stm32.h"
#include "mmw_config_stm32.h"

int main(void)
{		
    //变量初始化
    int retVal;//接受mmwave程序返回值,看是否执行成功,可有可无

    //--------------------stm32的初始化--------------------
    u8 t=0;
    delay_init();	    	 //延时函数初始化	  
    NVIC_Configuration(); 	 //设置NVIC中断分组2:2位抢占优先级，2位响应优先级
    uart_init(9600);	 //串口初始化为9600
    //----------------------------------------------------

    //--------------------------------开始执行mmwave程序--------------------------------
    printf("================= mmWaveLink Example Application ====================\n\n");
    retVal = MMWL_App();//执行mmwave程序入口
    if(retVal == RL_RET_CODE_OK)
    {
        printf("=========== mmWaveLink Example Application execution Successful =========== \n\n");
    }
    else
    {
        printf("=========== mmWaveLink Example Application execution Failed =========== \n\n");
    }
    printf("=========== mmWaveLink Example Application: Exit =========== \n\n");
    //---------------------------------------------------------------------------------

    //可有可无
    while(1){
    printf("t:%d\n",t);
    delay_ms(500);
    t++;
    }
}

